package com.code2roc.fastboot.framework.security;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

@Component
public class SecurityConfig {
    @Autowired
    private ISecurityConfigHandleService securityConfigHandleService;

    public SecurityConfig(){

    }

    public List<String> getAllowedOrigin() {
        return securityConfigHandleService.getAllowedOrigin();
    }

    public List<String> getAllowAnonymousAccess() {
        return securityConfigHandleService.getAllowAnonymousAccess();
    }

    public boolean isOpenXSS() {
        return securityConfigHandleService.isOpenXSS();
    }

    public boolean isOpenSQLInject() {
        return securityConfigHandleService.isOpenSQLInject();
    }

    public int getValidateCodeExpire() {
        return securityConfigHandleService.getValidateCodeExpire();
    }

    public int getTokenExpire() {
        return securityConfigHandleService.getTokenExpire();
    }
}
